$OpenBSD: patch-Makefile,v 1.3 2007/05/03 17:34:09 alek Exp $
--- Makefile.orig	Sun Apr  9 00:13:42 2006
+++ Makefile	Wed May  2 01:49:48 2007
@@ -2,9 +2,9 @@ HC_VERS = 1.22
 CHANGEME1 = 1 # put PACKAGER = EBUILD|RPM etc here
 CHANGEME2 = 2
 CHANGEME3 = 3
-INSTALL_PATH = /usr/bin
-MAN_INSTALL_PATH = /usr/share/man/man1
-DOC_INSTALL_PATH = /usr/share/doc/hashcash-$(HC_VERS)
+INSTALL_PATH = ${PREFIX}/bin
+MAN_INSTALL_PATH = ${PREFIX}/man/man1
+DOC_INSTALL_PATH = ${PREFIX}/share/doc/hashcash
 MAKEDEPEND = makedepend
 MSLIB = mslib 
 # here you can choose the regexp style your system has
@@ -16,9 +16,9 @@ MSLIB = mslib 
 # 	REGEXP = 
 REGEXP=-DREGEXP_POSIX
 COPT_DEBUG = -g -DDEBUG
-COPT_GENERIC = -O3
+COPT_GENERIC =
 COPT_GNU = -O3 -funroll-loops
-COPT_X86 = -O3 -funroll-loops -march=pentium-mmx -mmmx \
+COPT_X86 = -funroll-loops -march=pentium-mmx -mmmx \
 	-D_REENTRANT -D_THREAD_SAFE -fPIC
 COPT_MINGW = -O3 -funroll-loops -march=pentium-mmx -mmmx \
         -D_REENTRANT -D_THREAD_SAFE
@@ -28,7 +28,7 @@ COPT_PPC_LINUX = -O3 -funroll-loops -fno-inline -mcpu=
 LIB=.a
 # request static link of -lcrypto only
 LIBCRYPTO=/usr/lib/libcrypto.a
-EXES = hashcash$(EXE) sha1$(EXE) sha1test$(EXE)
+EXES = hashcash$(EXE)
 INSTALL = install
 POD2MAN = pod2man
 POD2HTML = pod2html
@@ -109,7 +109,7 @@ debug-openssl:
 	$(MAKE) debug "CFLAGS=$(CFLAGS) -DOPENSSL" "LDFLAGS=$(LDFLAGS) $(LIBCRYPTO)"
 
 
-build:	hashcash$(EXE) sha1$(EXE)
+build:	hashcash$(EXE)
 
 build-dll:      hashcash-dll$(EXE) sha1$(EXE)
 
@@ -132,7 +132,8 @@ all:	$(EXES)
 
 libhashcash$(LIB):	$(LIBOBJS)
 	$(DELETE) $@
-	$(AR) rcs $@ $(LIBOBJS)
+	$(AR) cr $@ $(LIBOBJS)
+	$(RANLIB) $@
 
 hashcash.dll:   $(LIBOBJS)
 	$(CC) -shared -o hashcash.dll $(LIBOBJS) \
@@ -162,13 +163,11 @@ sha1-hashcash.html:	sha1-hashcash.pod
 sha1-hashcash.txt: sha1-hashcash.pod
 	$(POD2TEXT) $? > $@
 
-install:	hashcash sha1 hashcash.1 sha1-hashcash.1
-	$(INSTALL) -d $(INSTALL_PATH)
-	$(INSTALL) hashcash sha1 $(INSTALL_PATH)
-	$(INSTALL) -d $(MAN_INSTALL_PATH)
-	$(INSTALL) -m 644 hashcash.1 sha1-hashcash.1 $(MAN_INSTALL_PATH)
-	$(INSTALL) -d $(DOC_INSTALL_PATH)
-	$(INSTALL) -m 644 README LICENSE CHANGELOG $(DOC_INSTALL_PATH)
+install:	hashcash hashcash.1
+	$(BSD_INSTALL_PROGRAM) hashcash $(INSTALL_PATH)
+	$(BSD_INSTALL_MAN) hashcash.1 $(MAN_INSTALL_PATH)
+	$(BSD_INSTALL_DATA_DIR) $(DOC_INSTALL_PATH)
+	$(BSD_INSTALL_DATA) README LICENSE CHANGELOG $(DOC_INSTALL_PATH)
 
 depend:
 	$(MAKEDEPEND) -- -Y *.c *.h
